﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WMS.Domain;
using WMS.ErrorCode;
using WMS.WebApiRead.Application.Command;

namespace WMS.WebApiRead.Controllers
{
    /// <summary>
    /// 库位主管控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class WarehouseSupervisorController : ControllerBase
    {
        private readonly IMediator mediator;
        private readonly ILogger<WarehouseSupervisorController> logger;

        public  WarehouseSupervisorController(IMediator mediator,ILogger<WarehouseSupervisorController> logger)
        {
            this.mediator = mediator;
            this.logger = logger;
        }
        /// <summary>
        /// 库位主管查询
        /// </summary>
        [HttpGet]
        public async Task<ApiResult<List<WarehouseSupervisor>>> WarehousesupervisorsQuery()
        {
         return await mediator.Send(new WarehousesupervisorsQueryCommand());   
        }
    
    
    
    }
}
